<?php

class column {

  function getColumns (&$shop,$params = '') {
      $this->columns = $shop->call('dbaBerrubriken','getPubRubriken');
      $this->columncount = 0;
      if ($this->columns){
        return true;
      }
  }

  function nextColumn (&$shop,$params = '') {
     if ($this->columncount < count($this->columns)){
        while (list($name,$value) = each($this->columns[$this->columncount])){
	  if (!preg_match('/^\d+$/',$name)){
	    $shop->setBlockVar($name,$value);
	  }
	}
	$this->columncount++;
        return true;
     } else {
        unset($this->columns);
	return;
     }
  }

  function columnLink (&$shop,$params) {
     if ($params[0]){
       $link = '<a href="'.$shop->getVar('SCRIPT_NAME').'?a=ccl&ncl=<%=$id%>&tr=<%=$TEMPLATE_ROOT%>&t='.$shop->cfgTpl['reportlist'].'" target="'.$shop->cfgTplFrame['reportlist'].'">'.$params[0].'</a>';
       $link = $shop->mod['parser']->evalVars($link);
       $shop->out($link);
     } else {
       print "<b>columnLink: erster Parameter fehlt</b><br>";
     }
  }

}

?>